package com.ruoyi.system.enums;

import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
public enum EventTypeEnums {
    PROPOSE("1", "建议"),
    COMPLAIN("2", "投诉"),
    FEEDBACK("3", "反馈");

    private final String code;
    private final String message;

    EventTypeEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static EventTypeEnums getInstance(String code) {
        switch (code) {
            case "1":
                return PROPOSE;
            case "2":
                return COMPLAIN;
            case "3":
                return FEEDBACK;
            default:
                return null;
        }
    }
}
